package ubi.com.wifitest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    private static final String TAG = "MainActivity";

    private WifiManagerDialog wifiDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        findViewById(R.id.main_wifi_fab).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (wifiDialog != null && !wifiDialog.isShowing())
                    wifiDialog.show();
            }
        });

        wifiDialog = new WifiManagerDialog(this);
    }

    @Override
    protected void onDestroy() {
        wifiDialog.destroy();
        super.onDestroy();
    }
}
